"""
@name : 13.抽象基类
@author : wenyao
@projectname: sanchuanglianxi
"""
from abc import ABC, abstractmethod
class Animal(ABC):

    @abstractmethod
    def eat(self):
        pass

    @abstractmethod
    def drink(self):
        pass

class Dog(Animal):
    def eat(self):
        print("dog is eating....")

    def drink(self):
        print("i am drink.....")

dog = Dog()
dog.eat()
dog.drink()

#a = Animal()
# 抽象基类 定义了接口规范 子类必须实现抽象基类父类里的抽象方法，抽象方法用@abstractmethod装饰
#抽象基类不能实例化
